<div class="col-sm-3 col-md-2 sidebar">
  <ul class="nav nav-sidebar">
    <li><a href="/console/manage/query">查询数据<span class="sr-only">(current)</span></a></li>
    <li class="active"><a href="/console/manage/cmd">实时监控</a></li>
      <li><a href="/console/manage/history_state">历史状态</a></li>

    <li><a href="/console/manage/analysis">数据分析</a></li>
      <li><a href="/console/manage/diagnose">故障诊断</a></li>
  </ul>
</div>

<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<h1 class="page-header">实时监控
    <span class="label label-primary">通信终端ID:{{ communicator_id }}</span>
    <span class="label label-primary">控制终端ID:{{ terminal_id }}</span>
</h1>

<h2><small>实时控制  </small><button class="btn btn-link get-btn" id="ctr_btn" >提交</button></h2>
<div class="btn-group ctr-group" data-toggle="buttons">
    {% for option in cmd_options %}
        <label class="btn btn-primary">
            <input type="radio" name="options" id="option{{ option.value }}"  value="{{ option.value }}">{{ option.title }}
        </label>
    {% endfor %}
</div>


<h2><small>参数查询  </small><button class="btn btn-link get-btn" id="query_btn">查询</button></h2>
<div class="btn-group query-group" data-toggle="buttons">
    {% for option in query_options %}
        <label class="btn btn-primary ">
            <input type="radio" name="options" id="option{{ option.value }}"  value="{{ option.value }}" >{{ option.title }}
        </label>
    {% endfor %}
</div>

</div>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <h2><small>操作状态</small>
        <span class="label label-primary">{{ opt_state }}</span>
    </h2>
     <table class="table">
        <thead>
            <tr>
                {% for res_title in res_titles %}
                    <th> {{ res_data.title }}</th>
                {% endfor %}
            </tr>
        </thead>
        <tbody>
            {% for res_data in res_datas %}
                <tr>
                    {% for res_data_item in res_data %}
                        <td>{{ res_data_item }}</td>
                    {% endfor %}
                </tr>
            {% endfor %}
        </tbody>
     </table>
</div>

<!-- 等待模态框 -->
<div class="modal fade bs-load-modal-sm" id="connect_wait" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
  <div class="modal-dialog modal-sm" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title" id="waitForResult">实时通信中</h4>
      </div>
      <div class="modal-body">
        <div class="op-info">正在操作，请稍后......</div>
      </div>
      <div class="modal-footer">
       <div><button type="button" class="btn btn-default" id="connect_cancel_btn" data-dismiss="modal">取消</button></div>
      </div>
    </div>
  </div>
</div>